package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.UserPrivilege;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserPrivilegeMapper {
    int deleteByPrimaryKey(Integer id);

    int insertSelective(UserPrivilege record);

    UserPrivilege selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserPrivilege record);

    int updateByPrimaryKey(UserPrivilege record);

    List<UserPrivilege> findUserOperatePrivilegeByUserId(String userid,Integer privilegeType);

    int deleteStaffPrivilegesByUserId(String userid,Integer privilegeType);

    int saveStaffPrivilegesByUserId(List<UserPrivilege> userPrivileges);

    List<UserPrivilege> findUserPrivilegeByUserIds (@Param("userIds") List<String> userIds);

    List<UserPrivilege> findPrivilegeCodesByUserId(String userId);

    List<UserPrivilege> findPrivilegeByUserIdAnd3Level(String userId, Integer functionType);

    List<UserPrivilege> findPublishPrivilegeByUserId(String userId);

    UserPrivilege findPrivilegeByUserIdAndCode(String userid, String privilegeCode);

    List<UserPrivilege> findUserOperatePrivilegeByUserIds(@Param("userIds") List<String> userIds);

    List<UserPrivilege> findPurchasePagePrivilege(@Param("userId") String userId);

}
